<!DOCTYPE html>
<html ng-app>
<head >
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="/inventles/js/lib/angular/angular.min.js"></script>
<script src="/inventles/js/lib/angular/angular-resource.js"></script>
<script src="/inventles/js/lib/bootstrap/bootstrap.js"></script>
<script src="/inventles/js/lib/bootstrap/bootstrap.min.js"></script>
<script src="/inventles/js/services/customer.js"></script>
<link rel="stylesheet" href="/inventles/css/bootstrap.css">
<title>:: Customers ::</title>
</head>



<body ng-controller="Customer" >
<button class="btn btn-primary btn-lg" ng-click="editCustomer('new')" data-toggle="modal" data-target="#editModal">
	Add New Customer
</button>
 <table class="table table-striped">
		<tr>
			<th>Id</th>
			<th>First Name</th>
			<th>Last Name</th>
			<th>Cell</th>
			<th>Address </th>
			<th>City</th>
			<th>Zip code</th>
			<th>Country</th>
			<th>Phone</th>
			<th>Email</th>
			<th></th>
		</tr>
		<tr ng-repeat="customer in customerList">
			<td>{{customer.customerId}}</td>
			<td>{{customer.firstName}}</td>
			<td>{{customer.lastName}}</td>
			<td>{{customer.cell}}</td>
			<td>{{customer.address}} {{customer.address2}}</td>
			<td>{{customer.city}}</td>
			<td>{{customer.zip}}</td>
			<td>{{customer.country}}</td>
			<td>{{customer.phone}}</td>
			<td>{{customer.email}}</td>
			<td><button role='button' class='btn btn-primary btn-lg btn-block' ng-click="editCustomer(customer)" data-toggle="modal" href="#editModal">Edit</button></td>
    
		</tr>
	</table>
	
	<div class="modal" ng-include="'add.html'" id="editModal" role='dialog'>
	</div>
	
</body>
</html>